package com.xy.network.errorhandler

import io.reactivex.Observable
import io.reactivex.functions.Function

/**
 * @ClassName HttpErrorHandler
 * @Author xy
 * @Date 2021/8/18 10:03
 * @Description 错误处理器
 */
 class HttpErrorHandler<T> : Function<Throwable,Observable<T>> {
    override fun apply(t: Throwable): Observable<T> {

        return Observable.error(ExceptionHandle.handleException(t))
    }
}